<?php

namespace app\admin\service\statistics\promotion\h5;

use app\admin\service\statistics\promotion\AbstractQueryStatistician;
use app\admin\service\statistics\traits\CompletionTrait;
use app\admin\service\statistics\traits\FilterTrait;
use app\admin\service\statistics\traits\GrouperCreatedToDateTrait;
use app\common\model\AccessLog;
use app\common\model\Member;
use app\common\model\MemberDraft;
use app\common\model\TempToken;


/**
 * 渠道数据 H5 律师入驻资料数
 * Class MemberDraftCount
 * @package app\admin\service\statistics\promotion\h5
 */
class MemberDraftCount extends AbstractQueryStatistician
{
    // 筛选器
    use FilterTrait;

    // 分组器
    use GrouperCreatedToDateTrait;

    // 补齐
    use CompletionTrait;

    protected function getQuery()
    {
        return MemberDraft::field(['count(*)' => 'value'])
            ->where('pf', AccessLog::PF_H5);
    }

    protected function getDefaultValue()
    {
        return '0';
    }
}